home *** CD-ROM | disk | FTP | other *** search
- //
- // list.h - list interface using global classes
- //
-
- struct listnode
- {
- listnode(unsigned n, listnode *p)
- : number(n), next(p) { }
- unsigned number;
- listnode *next;
- };
-
- class list
- {
- public:
- list(unsigned n);
- ~list();
- void add(unsigned n);
- void print();
- private:
- listnode *first, *last;
- };
-
-